use SGML::Parser;
my $p = Parser->new('t/invalid.html');
my $c = $p->parse();
print "Found $c errors.\n";
my $e = $p->getErrs();
for (@{$e}) {
printf "Line %s, Column %s, Offset %s: %s\n",
$_->{Line}, $_->{Column}, $_->{Offset}, $_->{Message};
}
All better now...